package com.itheima.多线程.基础;

public class Demo3 implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName()+"........."+i);
        }
    }
}

class Test3 {
    public static void main(String[] args) {
        Demo3 demo = new Demo3();
//        Thread thread1 = new Thread(demo, "张三");
//        Thread thread2 = new Thread(demo, "李四");
//        Thread thread3 = new Thread(demo, "王五");
//        Thread thread4 = new Thread(demo, "麻六");
//        thread1.start();
//        thread2.start();
//        thread3.start();
//        thread4.start();
        new Thread(()-> System.out.println("线程开始了...........")).start();

    }
}